--[[ 编码: WMS-24-11 名称: 出库单-新增窗口-选库区前 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: BeforeSelectArea 功能: 弹出仓库查询面板 更改记录: --]] json = require ("json") mobox = require ("OILua_JavelinExt") m3 = require("oi_base_mobox") function BeforeSelectArea ( strLuaDEID ) local nRet, strRetInfo -- 获取仓库编码 nRet, strRetInfo = mobox.getCurEditDataObjAttr( strLuaDEID, "S_WH_CODE" ) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "获取当前编辑属性失败! "..strRetInfo ) end local obj_attrs = json.decode( strRetInfo ) local wh_code = lua.Get_StrAttrValue( obj_attrs[1].value ) if ( wh_code == '' ) then return end -- 设置 action 的参数 local action = { { action_type = "open_data_query_dlg", value = { multi_choice = false, cls_name = "Area", grid_style = "选择面板用", condition = "S_WH_CODE = '"..wh_code.."'", order = "S_CODE" } } } nRet, strRetInfo = mobox.setAction( strLuaDEID, lua.table2str(action) ) if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), strRetInfo ) end end